Skip to content

feat: v1#231

Open
jxom wants to merge 195 commits into
mainfrom
v1
Open

feat: v1#231
jxom wants to merge 195 commits into
mainfrom
v1

Conversation

@jxom

@jxom jxom commented May 7, 2026

Copy link
Copy Markdown
Member

Breaking changes

  • Hex-encoded crypto coordinates. Migrated Signature, PublicKey, BlsPoint, and all envelope types (Transaction, Authorization, ERC envelopes, Tempo) from bigint r/s/x/y/Fp/Fp2 to padded Hex.Hex (32-byte for secp256k1/P256/WebAuthnP256, 48-byte for BLS12-381). The bigintType generic is removed.

    - Signature.from({ r: 0x6e10...n, s: 0x4a90...n, yParity: 1 })
    + Signature.from({
    +   r: '0x6e100a352ec6ad1b70802290e18aeed190704973570f3b8ed42cb9808e2ea6bf',
    +   s: '0x4a90a229a244495b41890987806fcbd2d5d23fc0dbe5f5256c2613c039d76db8',
    +   yParity: 1,
    + })
  • @noble/* v2. Upgraded @noble/ciphers, @noble/curves, @noble/hashes, @scure/bip32, @scure/bip39. ECDSA signatures (Secp256k1, P256) now default to lowS: true. Module .noble re-exports follow v2 (randomSecretKey, Point, bls.longSignatures.*, etc.).

  • PeerDAS (EIP-7594) blob model. Removed the EIP-4844 blob-sidecar surface (Blobs.toSidecars, Blobs.BlobSidecar(s), TxEnvelopeEip4844.sidecars, Kzg.Kzg.computeBlobKzgProof). Added the BlobCells module for cell/column propagation. KZG backends must implement computeCells, computeCellsAndKzgProofs, recoverCellsAndKzgProofs, verifyCellKzgProofBatch.

    - sidecars: { blobs, commitments, proofs }
    + sidecars: { blobs, commitments, cellProofs }
  • ABI decode checksums by default. AbiParameters.decode (and downstream AbiFunction/AbiEvent/AbiError decoders) checksum decoded address outputs. Opt out with checksumAddress: false.

Notable additions

  • Crypto serialized inputs and as option. Secp256k1, P256, WebCryptoP256, and Bls now accept Hex.Hex | Bytes.Bytes | Signature.Signature | PublicKey.PublicKey for signature/publicKey params, and expose as: 'Hex' | 'Bytes' | 'Object' on sign / getPublicKey / recoverPublicKey.

    - const signature = Secp256k1.sign({ payload, privateKey })
    + const signature = Secp256k1.sign({ payload, privateKey, as: 'Hex' })
  • AbiEvent.decodeLog. Extract and decode an event log directly from an ABI.

    const abi = Abi.from([
      'event Transfer(address indexed from, address indexed to, uint256 value)',
    ])
    
    const { event, args } = AbiEvent.decodeLog(abi, {
      data: '0x0000000000000000000000000000000000000000000000000000000000000001',
      topics: [
        '0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef',
        '0x000000000000000000000000a5cc3c03994db5b0d9a5eedd10cabab0813678ac',
        '0x000000000000000000000000a5cc3c03994db5b0d9a5eedd10cabab0813678ac',
      ],
    })
    // event: { name: 'Transfer', type: 'event', ... }
    // args:  { from: '0xa5cc...', to: '0xa5cc...', value: 1n }
  • AbiEvent.extractLogs. Filter and decode logs from a batch against an ABI.

    const logs = AbiEvent.extractLogs(abi, logs, { eventName: 'Transfer' })
    // [{ eventName: 'Transfer', args: { from, to, value }, topics, data }, ...]
  • AbiError.extract. Select the matching ABI error from revert data and decode its arguments.

    const abi = Abi.from([
      'error InvalidSignature(uint r, uint s, uint8 yParity)',
    ])
    
    const { error, args } = AbiError.extract(
      abi,
      '0xecde6349...0001a4...0045...0001',
    )
    // error: { name: 'InvalidSignature', type: 'error', ... }
    // args:  [420n, 69n, 1]
  • AbiFunction.decodeData selector inference. Pass an ABI plus calldata and the function is resolved from the 4-byte selector. Decoding selector-only calldata for a function with inputs now throws AbiParameters.DataSizeTooSmallError instead of silently returning undefined, and constructorless AbiConstructor deploy data is now allowed when there are no arguments.

    const abi = Abi.from(['function approve(address, uint256)', /* ... */])
    
    const input = AbiFunction.decodeData(
      abi,
      '0x095ea7b3000000000000000000000000d8da6bf26964af9d7eed9e03e53415d37aa960450000000000000000000000000000000000000000000000000000000000010f2c',
    )
    // ['0xd8dA6BF26964aF9D7eEd9e03E53415D37aA96045', 69420n]
  • Transaction envelope router. TxEnvelope.from / serialize / deserialize / hash / getSignPayload / toRpc infer the envelope type from input properties and route to the matching TxEnvelopeLegacy / TxEnvelopeEip2930 / TxEnvelopeEip1559 / TxEnvelopeEip4844 / TxEnvelopeEip7702 module.

    const envelope = TxEnvelope.from({
      chainId: 1,
      maxFeePerGas: 1n,
    })
    
    const serialized = TxEnvelope.serialize(envelope, { signature })
    const hash = TxEnvelope.hash(envelope)

@vercel

vercel Bot commented May 7, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
ox Error Error Jun 23, 2026 2:36am

Request Review

Bumps @noble/ciphers, @noble/curves, @noble/hashes, @scure/bip32,
and @scure/bip39 to v2 and refactors crypto wrappers to the new APIs
(Uint8Array signatures, Point.fromBytes, Signature.fromBytes/toBytes,
bls.longSignatures, randomSecretKey, .js import extensions).

Adds an internal helper for converting between ox's { r, s, yParity }
Signature shape and noble's compact/recovered byte layouts. Restores
ImportMeta.env types for tests now that vitest v4 dropped them.

Amp-Thread-ID: https://ampcode.com/threads/T-019e05c5-ba3e-711e-8ea5-532440226027
jxom added 20 commits May 8, 2026 15:25
Bumps @noble/ciphers, @noble/curves, @noble/hashes, @scure/bip32,
and @scure/bip39 to v2 and refactors crypto wrappers to the new APIs
(Uint8Array signatures, Point.fromBytes, Signature.fromBytes/toBytes,
bls.longSignatures, randomSecretKey, .js import extensions).

Adds an internal helper for converting between ox's { r, s, yParity }
Signature shape and noble's compact/recovered byte layouts. Restores
ImportMeta.env types for tests now that vitest v4 dropped them.

Amp-Thread-ID: https://ampcode.com/threads/T-019e05c5-ba3e-711e-8ea5-532440226027
The tempo node returns a blockTimestamp on transaction responses; add
it to the core Transaction type, parse it in fromRpc, and serialize it
in toRpc. Updates the tempo e2e tests to assert it on transactions
returned via Transaction.fromRpc.

Amp-Thread-ID: https://ampcode.com/threads/T-019e05c5-ba3e-711e-8ea5-532440226027
Implementation for the changeset added in 2b32e0c (the source change was lost in a concurrent stash on the previous commit).

Amp-Thread-ID: https://ampcode.com/threads/T-019e197d-5765-7569-9e8b-b992045f9165
jxom and others added 30 commits June 6, 2026 19:39
Derive 5-15 word meta descriptions from TSDoc summaries with an optional
@description override, wire them into docgen output and static pages, and
refactor OG image generation to import assets directly.

Amp-Thread-ID: https://ampcode.com/threads/T-019e9be9-2b68-7531-bde7-a79cd9cc2776
Recreate the static homepage OG image in code and bump the npm install
command and "by Wevm" badge sizing.

Amp-Thread-ID: https://ampcode.com/threads/T-019e9be9-2b68-7531-bde7-a79cd9cc2776
…r item

Drop the group-level link on each API module and add an Overview entry as
the first child linking to the module root, sourcing the reference index
table link from a dedicated field.

Amp-Thread-ID: https://ampcode.com/threads/T-019e9be9-2b68-7531-bde7-a79cd9cc2776
… multiple entrypoints

Transaction, TransactionReceipt, and TransactionRequest are exported from both
the core and tempo entrypoints. namespaceDocComments was keyed by bare name with
last-writer-wins, so tempo's metadata overwrote core's and the rendered (core)
pages were written to /tempo/reference instead of /api. Merge first-writer-wins
so the canonical core export's doc comment takes precedence.

Amp-Thread-ID: https://ampcode.com/threads/T-019ecdb2-74ba-7404-ad56-cfc8a952dacc
Names exported from multiple entrypoints (e.g. Transaction in core + tempo,
RpcSchema in core + erc4337) were dropped from the merged model, leaving
only the core pages. Recover each colliding namespace from a dedicated
single-entrypoint model so both the core and secondary-entrypoint pages
render under their own paths.

Amp-Thread-ID: https://ampcode.com/threads/T-019ecdb2-74ba-7404-ad56-cfc8a952dacc
…pshots

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Add z.RpcSchema.from namespace overload that normalizes a record of { params, returns } Zod schemas (keyed by method name) into a parseable RpcSchema.Namespace. Add RpcSchema.Schema/ToGeneric/FromZod, and make Provider.from and RpcTransport.fromHttp accept a Zod namespace as their schema option.

Amp-Thread-ID: https://ampcode.com/threads/T-019ed995-3ad0-77e6-8cc8-af5d1597efc5
* feat(abi): move human-readable utils into ox

* chore: bump vocs

* chore: up

* chore: up

* chore: format
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants